<template>
  <div class="wrap header">
    <div class="logo">
      <img src="../assets/img/indexLogo.6f8ac4f0.png" alt="" />
    </div>
    <ul class="navbox">
      <li :class="{current:$route.path=='/home'}" @click="$router.push('/home')">首页</li>
      <li :class="{current:$route.path=='/goods'}" @click="$router.push('/goods')">全部商品</li>
      <li :class="{current:$route.path=='/user'}" @click="$router.push('/user')">个人中心</li>
      <li :class="{current:$route.path=='/order'}" @click="$router.push('/order')">我的订单</li>
      <li :class="{current:$route.path=='/free'}" @click="$router.push('/free')">专属福利</li>
    </ul>
    <div class="searchbox">
      <input type="text" placeholder="请输入关键字" />
      <span><img src="../assets/img/search.png" alt="" /></span>
    </div>
  </div>
</template>

<script>
export default {
  data() {
    return {};
  },
};
</script>
 
<style lang = "less" scoped>
.header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-weight: 500;
  font-size: 16px;
  height: 118px;
   cursor: pointer;
  .navbox {
    display: flex;
    justify-content: space-between;
    width: 500px;
    
    .current {
      color: #0a3280;
    }
  }
  .searchbox {
    display: flex;
    input {
      width: 214px;
      height: 40px;
      border: 1px solid #dedede;
      border-radius: 20px 0px 0px 20px;
     box-sizing: border-box;
      outline: none;
      padding-left: 20px;
    }
    span {
      width: 50px;
      height: 40px;
      line-height: 40px;
      background: #0a328e;
      text-align: center;
      border-radius: 0px 20px 20px 0px;
      img {
        width: 15px;
        height: 15px;
      }
    }
  }
}
</style>